<?php

try {
    require __DIR__.'/vendor/autoload.php';
    
    $app = require_once __DIR__.'/bootstrap/app.php';
    
    echo "Laravel application loaded successfully!\n";
    
    // Test basic functionality
    echo "App name: " . $app->make('config')->get('app.name') . "\n";
    echo "Environment: " . $app->environment() . "\n";
    
} catch (Exception $e) {
    echo "Error: " . $e->getMessage() . "\n";
    echo "File: " . $e->getFile() . ":" . $e->getLine() . "\n";
    echo "Trace:\n" . $e->getTraceAsString() . "\n";
}